﻿using SuperFrame.Charts.Points;
using System;
using System.Windows.Media;

namespace SuperFrame.Charts
{
    public class PointTimeSpan : ChartPoint
    {
        public PointTimeSpan()
        {
        }


        public PointTimeSpan(string ID, TimeSpan timeSpan, double value)
        {
            this.TimeSpan = timeSpan;
            this.Value = value;
            this.ID = ID;
        }

        public PointTimeSpan(string ID, TimeSpan timeSpan, double value, Brush color)
        {
            this.TimeSpan = timeSpan;
            this.Value = value;
            this.Color = color;
            this.ID = ID;
        }
        public PointTimeSpan(string ID, TimeSpan timeSpan, double value, string describe)
        {
            this.TimeSpan = timeSpan;
            this.Value = value;
            this.Describe = describe;
            this.ID = ID;
        }
        public PointTimeSpan(string ID, TimeSpan timeSpan, double value, Brush color, string describe)
        {
            this.TimeSpan = timeSpan;
            this.Value = value;
            this.Color = color;
            this.Describe = describe;
            this.ID = ID;
        }


        public PointTimeSpan(TimeSpan timeSpan, double value)
        {
            this.TimeSpan = timeSpan;
            this.Value = value;
        }

        public PointTimeSpan(TimeSpan timeSpan, double value, Brush color)
        {
            this.TimeSpan = timeSpan;
            this.Value = value;
            this.Color = color;
        }
        public PointTimeSpan(TimeSpan timeSpan, double value, string describe)
        {
            this.TimeSpan = timeSpan;
            this.Value = value;
            this.Describe = describe;
        }
        public PointTimeSpan(TimeSpan timeSpan, double value, Brush color, string describe)
        {
            this.TimeSpan = timeSpan;
            this.Value = value;
            this.Color = color;
            this.Describe = describe;
        }

        private TimeSpan m_timeSpan;
        public TimeSpan TimeSpan
        {
            get
            {
                return m_timeSpan;
            }
            set
            {
                m_timeSpan = value;
                this.XValue = m_timeSpan.TotalMilliseconds;
            }
        }

        private double m_value;
        public double Value
        {
            get
            {
                return m_value;
            }
            set
            {
                m_value = value;
                this.YValue = value;
            }
        }

    }
}
